package com.buss.customer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.buss.core.persistence.Paginalbe;
import com.buss.core.persistence.ResultList;
import com.buss.customer.dao.CustomerSourceDao;
import com.buss.customer.model.CustomerSource;
import com.buss.customer.service.CustomerSourceService;

@Service
public class CustomerSourceServiceImpl implements CustomerSourceService {

	@Autowired
	private CustomerSourceDao sourceDao;
	
	@Override
	public CustomerSource saveSource(CustomerSource source) {
		return sourceDao.saveSource(source);
	}

	@Override
	public void editSource(CustomerSource source) {
		sourceDao.updateSource(source);
	}

	@Override
	public void removeSource(Long[] ids) {
		sourceDao.removeSource(ids);
	}

	@Override
	public CustomerSource loadSource(Long id) {
		return sourceDao.loadSource(id);
	}

	@Override
	public ResultList<CustomerSource> querySource(String companyId,
			String name, Paginalbe page) {
		return sourceDao.querySource(companyId, name, page);
	}

}
